import pygame

class Score:
    def __init__(self, config):
        self.config = config
        self.current_score = 0
        self.high_score = config.load_high_scores()

    def update_score(self, points):
        self.current_score += points
        if self.current_score > self.high_score:
            self.high_score = self.current_score
            self.config.save_high_score(self.high_score)

    def reset(self):
        self.current_score = 0

    def draw(self, screen):
        score_text = self.config.countscore_font.render(
            f"Score: {self.current_score}  High: {self.high_score}",
            True, self.config.colors['white']
        )
        screen.blit(score_text, (10, 10))